package com.nuc.zyt.day04.demo.cookfoodie;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @ClassName FoodiePlus
 * @Description TODO
 * @Author 耀酱
 * @Date 2023/5/30 8:31
 * @Version 1.0
 */

public class FoodiePlus extends Thread{
    private ArrayBlockingQueue<String> ab;

    public FoodiePlus(ArrayBlockingQueue ab){
        this.ab=ab;
    }

    @Override
    public void run() {
        try {
            String take = ab.take();
            System.out.println(take);

        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
